#ifndef ICONHELPER_H
#define ICONHELPER_H

#include <QObject>
#include <QLabel>
#include <QAbstractButton>

#define FONT_PATH_AWESOME4    ":/font/fontawesome-webfont.ttf"
#define FONT_FAMILY_AWESOME4  "FontAwesome"
#define FONT_PATH_WEATHER     ":/font/pe-icon-set-weather.ttf"
#define FONT_FAMILY_WEATHER   "pe-icon-set-weather"
#define FONT_PATH_ALIBABA     ":/font/iconfont.ttf"
#define FONT_FAMILY_ALIBABA   "FontAlibaba"

class IconHelper : public QObject
{
    Q_OBJECT

public:
    static IconHelper* GetInstance();
    void getAwesome4Icons(QList<int>& list);
    void getWeatherIcons(QList<int>& list);
    void getAlibabaIcons(QList<int>& list);
    void setIcon(QLabel* lbl, QString fontFamily, int icon, quint8 size = 10);
    void setIcon(QAbstractButton* btn, QString fontFamily, int icon, quint8 size = 10);

private:
    explicit IconHelper(QObject *parent = nullptr);
    static IconHelper* _self;
    QFont _iconFontAwesome4;
    QFont _iconFontWeather;
    QFont _iconFontAlibaba;

signals:

};

#endif // ICONHELPER_H
